﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="view.aspx.cs" Inherits="OnLineExam.Web.mag.Compare.view" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
	<link href="../../assets/easyui/1.5.4.4/themes/bootstrap/easyui.css" rel="stylesheet" />
	<link href="../../assets/easyui/1.5.4.4/themes/icon.css" rel="stylesheet" />

	<script src="../../assets/easyui/1.5.4.4/jquery.min.js"></script>
	<script src="../../assets/easyui/1.5.4.4/jquery.easyui.min.js"></script>
	<script src="../../assets/easyui/1.5.4.4/locale/easyui-lang-zh_CN.js"></script>

</head>
<body>

	<select id="QuestionType" class="easyui-combobox" name="QuestionType" data-options="  onChange:onChange">
		<% 
			var list = Enum.GetNames(typeof(OnLineExam.Data.QuestionType)).ToList();
			list.Insert(0, "请选择");
			foreach (var item in list)
			{
				Response.Write(string.Format("<option value='" + item + "'>" + item + "</option>"));
			}

		%>
	</select>
	<table id="tt">

		<script>
			var scoreId = '<%=Request.QueryString["id"]%>';
			var qtype = "";
			$(function () {



				$('#tt').datagrid({

					idField: 'ID',
					url: "userAnswerHandler.ashx?c= " + new Date(),
					queryParams: {"qtype":qtype,"id":scoreId,"type":"getlist"},
					singleSelect: true,sortName:'QuestionTypeStr',sortOrder:"asc",
					columns: [[
						{ field: 'ID', title: '序号', width: 80 },
						{ field: 'UserID', title: '工号', width: 100 },
						{ field: 'PaperName', title: '试卷', width: 80 },
						{ field: 'QuestionTypeStr', title: '类型', width: 80 ,sort:true},

						{ field: 'Title', title: '题目', width: 80 },
						{ field: 'QuestionAnswer', title: '答案', width: 80 },
						{ field: 'UserAnswer1', title: '作答', width: 80 },
						{ field: 'UserMark', title: '得分', width: 80 },						{ field: 'ExamTime', title: '时间', width: 150 }
					]]
				});
			});


			function onChange(newValue, oldValue) {

	$('#tt').datagrid({
		queryParams: {"qtype":newValue,"id":scoreId,"type":"getlist"}
	});
}
		</script>
</body>
</html>
